package com.ylbh.modules.shortmessage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ylbh.common.exception.NormalException;
import com.ylbh.common.pojo.shortmessage.vo.SmsSelectTemplateVO;
import com.ylbh.modules.shortmessage.entity.AppSmsTemplate;
import com.ylbh.common.pojo.shortmessage.dto.ShortMessageDTO;
import com.ylbh.common.utils.PageUtils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;

import java.util.List;


/**
 * 发送短信
 */
public interface ShortMessageService extends IService<ShortMessageDTO> {

    /**
     * 根据条件查询出符合用户
     * @param shortMessage
     * @return
     */
    PageUtils queryShortMessageUser(ShortMessageDTO shortMessage);

    /**
     * 短信群发
     * @param shortMessageDTO
     */
    void sendUser(ShortMessageDTO shortMessageDTO);
    /**
     * 阿里云短信模板添加
     * @param appSmsTemplate
     */
    void addTemplate(AppSmsTemplate appSmsTemplate);

    /**
     * 阿里云短信模板查询
     * @return
     */
    List<SmsSelectTemplateVO>  queryTemplateList();
    /**
     * 阿里云短信批量发送
     * @return
     */
    void sendBatchSms(ShortMessageDTO shortMessageDTO);

    /**
     * 导出要群发的号码
     * @param request
     * @param response
     */
    void exportShortMessageUser(HttpServletRequest request, HttpServletResponse response) throws ParseException, IOException;
}
